#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include <vector>
#include <iostream>
using namespace std;
int main()
{
	//int arr[] = { 1,2,3,4,5,6 };
	/*vector<int> v0(arr,arr+6);
	for (int i = 0; i < 6; i++) {
		cout << v0[i] << " ";
	}
	cout << endl;
	vector<int> v1(6, 9);
	for (int i = 0; i < 6; i++) {
		cout << v1[i] << " ";
	}
	cout << endl;
	vector<int> v2(v1);
	for (int i = 0; i < 6; i++) {
		cout << v2[i] << " ";
	}
	cout << endl;
	vector<int> v3 = v2;
	for (int i = 0; i < 6; i++) {
		cout << v3[i] << " ";
	}
	cout << endl;*/
	vector<int> vv0, vv1, vv2, vv3;
	int arr[] = {1,2,3,4};
	vv0.assign(arr, arr + 4);
	for (int i = 0; i < 4; i++) {
		cout << vv0[i] << " ";
	}
	cout << endl;
	vv1.assign(vv0.begin(), vv0.end());
	for (int i = 0; i < vv1.size(); i++) {
		cout << vv1[i] << " ";
	}
	cout << endl;
	vv2.assign(3, 9);
	for (int i = 0; i < vv2.size(); i++) {
		cout << vv2[i] << " ";
	}
	cout << endl;
	vv2.swap(vv1);
	for (int i = 0; i < vv2.size(); i++) {
		cout << vv2[i] << " ";
	}
	cout << endl;
	for (int i = 0; i < vv1.size(); i++) {
		cout << vv1[i] << " ";
	}
	cout << endl;

	return 0;
}